package queue.pratice;

import array.ArrayStack;
import queue.ArrayQueue;
import queue.LinkedQueue;






public class ReverseQueue {
    public static void main(String[] args) {
        ArrayStack<Integer> stack = new ArrayStack<>(10);
        LinkedQueue<Integer> queue = new LinkedQueue<>();
        queue.enqueue(1);
        queue.enqueue(2);
        queue.enqueue(3);
        queue.enqueue(4);
        stack.push(queue.dequeue());
        stack.push(queue.dequeue());
        stack.push(queue.dequeue());
        stack.push(queue.dequeue());
        queue.enqueue(stack.pop());
        queue.enqueue(stack.pop());
        queue.enqueue(stack.pop());
        queue.enqueue(stack.pop());
        queue.show();
    }
}
